<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:include href="menu.xsl" />
<xsl:include href="footer.xsl" />
<xsl:output doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" method="xml" encoding="iso-8859-1" />
  <xsl:template match="/">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
  <head>
  <title>Manager Framework Mise a jour</title>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

  	<link rel="stylesheet" href="public/manager/css/manager.css" type="text/css" media="screen" />
  	<script type="text/javascript" src="public/manager/js/menu.js"></script>

  </head>
  <body>
  
    <div id="header">
    	<img id="logo" src="public/manager/images/bando.png" alt="Fw-BofF" />  
    </div>
    
    <div id="date">
      <xsl:value-of select=".//site/date" />
    </div>
    
    
    <!--<ul id="menu">
    	<li><a href="index.php?action=homeManager">Home</a></li>
    	<li><a href="index.php?action=homeUsers">Users</a></li>
    	<li><a href="index.php?action=homeMonitoring">Monitoring</a></li>
    	<li><a href="index.php?action=homeScaffolding">Scaffolding</a></li>
    	<li><a class="active" href="index.php?action=homeUpdates">Updates</a></li>
    </ul>-->
    <xsl:call-template name="displayMenu">
      <xsl:with-param name="selectedMenu" select="string('admin')"/>
    </xsl:call-template>
    
    
    <div id="PageLeft">
      <div id="menutaches">
          <!--<a href="" style="text-decoration:none"><img src="public/manager/images/upload.png"/>Upload a module</a><br/><br/>-->
          <!--<a href="" style="text-decoration:none"><img src="public/manager/images/upload.png"/>Upload a package</a><br/><br/>-->
          <a href="index.php?action=exportSite" style="text-decoration:none"><img src="public/manager/images/save.png"/>Save my version</a>
      </div>
    
    
      <div id="content" style="float:left;">
      
        <xsl:for-each select=".//error">
        <h1 id="pageName" style="width:500px;"> Errors</h1><br/>
        <div style="width:500px;border:1px dotted #AAAAAA;background-color:#ECF3E1;padding:5px;">
        <b style="color:#FF6600"><xsl:value-of select="./text()" /></b>
        </div><br/><br/>
        </xsl:for-each>
        
        <h1 id="pageName" style="width:500px;"> Your version of the framework</h1>
        <p>
        <h2>
          Fw-BofF <b style="color:#ff6600"><xsl:value-of select=".//MyVersion/version/number" /></b> : <xsl:value-of select=".//MyVersion/version/name" />
        </h2><br/>
        </p>
        <div style="width:500px;border:1px dotted #AAAAAA;background-color:#ECF3E1;padding:5px;">
        <xsl:value-of select=".//MyVersion/version/comments" />
        </div>
        
      
        <h1 id="pageName" style="width:500px;margin-top:20px">   Saves and versions available   </h1> 
        <p> We suggest you to save your version before installing another one</p>
        <div style="padding:2px;margin-top:10px;border:1px dotted #AAAAAA;background-color:#ECF3E1;padding:5px;">
        
        <xsl:variable name="isSavedVersion" select="count(.//versions/version)"/>
        <xsl:if test="$isSavedVersion=0"> 
          <span class="important">No saves available.</span><br/><br/>
          We strongly recommend you to save your core version.
        </xsl:if>
        
          <table width="480">
          <xsl:for-each select=".//versions">
            <xsl:apply-templates match="version">
              <xsl:sort select="number" order="descending"/>
            </xsl:apply-templates>
         </xsl:for-each>
         </table>
    		</div>
    		
    </div>
    
    <div style="margin-left:30px;float:left;width:500px;">
      <h1 id="pageName" style="width:500px;">   Available modules   </h1> 
       <xsl:for-each select=".//modules">
      	<div id="revision" style="width:500px;">
      		<div style="padding:2px;margin-top:10px;border:1px dotted #AAAAAA;background-color:#ECF3E1;padding:5px;">
      		
      		<xsl:variable name="isModuleAvailable" select="count(//modules/version)"/>
          <xsl:if test="$isModuleAvailable=0"> 
            <span class="important">No module available.</span><br/><br/>
          </xsl:if>
      		
        <table width="480">
        <xsl:for-each select="version">
      		
      		<tr>
            <td>
              <h2>
                <!--<a href="" alt="delete" title="delete" ><img src="public/manager/images/delete.png" alt="delete"/></a>-->
                <a href="{URL}" alt="install now" title="install now" align="right"><img src="public/manager/images/install.png" /></a>
                 <xsl:value-of select="name" /> &#160; 
                <b style="color:#ff6600"><xsl:value-of select="number" /></b>
              </h2>
            </td>
          </tr>
          <tr>
            <td colspan="2"><i><xsl:value-of select="comments" /></i>
        		  </td>
          </tr>
       </xsl:for-each>
       </table>
      		</div>
      	</div>
       </xsl:for-each>
       
       
      <h1 id="pageName" style="width:500px;margin-top:20px">   Installed modules   </h1> 
      <div style="margin:10px 0 0 0px;width:490px;border:1px dotted #AAAAAA;background-color:#ECF3E1;padding:5px;">
      <p> Data will be available with the next version of the framework. </p>
      </div>
      </div>  
    </div>
    
    <xsl:call-template name="displayFooter" />
  </body>
</html>
 </xsl:template>
  <xsl:template match="version">
    <tr>
      <td>
        <h2>
          <!--<a href="" alt="delete" title="delete" ><img src="public/manager/images/delete.png" alt="delete"/></a>-->
          <a href="{URL}" alt="install now" title="install now" align="right"><img src="public/manager/images/install.png" /></a> Fw-BofF 
          <b style="color:#ff6600"><xsl:value-of select="number" /></b> : <xsl:value-of select="name" />
        </h2>
      </td>
    </tr>
    <tr>
      <td colspan="2"><i><xsl:value-of select="comments" /></i>
  		  </td>
    </tr>
  </xsl:template>
 </xsl:stylesheet>
